import {request, methodType} from '@/utils/http.js'
import {Menu} from "ant-design-vue";

/**
 * 注册
 * @param data
 * @returns {Promise<AxiosResponse<any>> | *}
 */
export const enroll = data => {
    return request({
        url: '/enroll',
        method: methodType.post,
        params: data
    })
}
/**
 * 登录
 * @param data
 * @returns {Promise<AxiosResponse<any>> | *}
 * @constructor
 */
export const Login = data => {
    return request({
        url: '/login',
        method: methodType.post,
        params: data
    })
}
/**
 * 获取验证码
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export const captcha = () => {
    return request({
        url: '/captcha',
        method: methodType.post,
    })
}

export const sendEmail = params => {
    return request({
        url: '/sendEmail',
        method: methodType.get,
        params
    })
}

/**
 * 
 * @param {  查询源码解析（成功过后才可以查看）} params 
 * @returns 
 */
export const infoCode = params => {
    return request({
        url: '/infoCode',
        method: methodType.get,
        params
    })
}


/**
 * 获取我的订单
 */
export const myOrderList=()=>{
    return request({
        url: '/byUserGetOrder',
        method: methodType.get
    })
}